﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows.Forms;
using FileRenamer.GUI;
using FRW.Common;

namespace FileRenamer
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            Application.EnableVisualStyles();
            Application.SetCompatibleTextRenderingDefault(false);

            // initialising path manager should always be first as this sets what mode we are in for SYSTEM or USER
            PathManager pm = PathManager.Instance;
            pm.SetType(ApplicationInstallType.SYSTEM);

            TheDoc doc = new TheDoc();

            // TODO we need to figure out why we sometimes get Index - 1 exceptions with index out of range??
            try
            {
                Application.Run(new Main(doc));
            }
            catch
            {
            }
        }
    }
}
